package QC.MessageBox.beans;

import QC.MessageBox.annotation.APPTable;

/**
 * Created by Andaren on 2017/4/10.
 * Used for: 公众号实体类
 */
@APPTable(table = "t_public")
public class WXPublic {

    @APPTable(column = "id", isId = true)
    private Long id;            // 公众号信息表主键

    @APPTable(column = "appid")
    private String appId;       // 公众号唯一标识

    @APPTable(column = "secret")
    private String secret;      // 公众号通信加密秘钥

    @APPTable(column = "developerid")
    private String developerId; // 开发者微信号（公众号原始ID）

    @APPTable(column = "access_token")
    private String accessToken; // 微信接口调用凭证

    @APPTable(column = "name")
    private String name;        // 公众号名称

    @APPTable(column = "updatetime")
    private String updateTime;  // 更新时间

    @APPTable(column = "createTime")
    private String createTime;  //  创建时间

    @APPTable(column = "channel_type")
    private Integer channelType;// 渠道类型

    public Long getId() {
        return id;
    }

    public WXPublic setId(Long id) {
        this.id = id;
        return this;
    }

    public String getAppId() {
        return appId;
    }

    public WXPublic setAppId(String appId) {
        this.appId = appId;
        return this;
    }

    public String getSecret() {
        return secret;
    }

    public WXPublic setSecret(String secret) {
        this.secret = secret;
        return this;
    }

    public String getDeveloperId() {
        return developerId;
    }

    public WXPublic setDeveloperId(String developerId) {
        this.developerId = developerId;
        return this;
    }

    public String getAccessToken() {
        return accessToken;
    }

    public WXPublic setAccessToken(String accessToken) {
        this.accessToken = accessToken;
        return this;
    }

    public String getName() {
        return name;
    }

    public WXPublic setName(String name) {
        this.name = name;
        return this;
    }

    public String getUpdateTime() {

        return updateTime;
    }

    public WXPublic setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
        return this;
    }

    public String getCreateTime() {
        return createTime;
    }

    public WXPublic setCreateTime(String createTime) {
        this.createTime = createTime;
        return this;
    }

    public Integer getChannelType() {
        return channelType;
    }

    public WXPublic setChannelType(Integer channelType) {
        this.channelType = channelType;
        return this;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("WXPublic{");
        sb.append("id=").append(id);
        sb.append(", appId='").append(appId).append('\'');
        sb.append(", secret='").append(secret).append('\'');
        sb.append(", developerId='").append(developerId).append('\'');
        sb.append(", accessToken='").append(accessToken).append('\'');
        sb.append(", name='").append(name).append('\'');
        sb.append(", updateTime='").append(updateTime).append('\'');
        sb.append(", createTime='").append(createTime).append('\'');
        sb.append(", channelType=").append(channelType);
        sb.append('}');
        return sb.toString();
    }
}
